/**
 * 
 */
package com.kandinfo.survey.question.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.kandinfo.base.common.dto.ResultDto;
import com.kandinfo.survey.question.dto.QuesRelationRequestDto;
import com.kandinfo.survey.question.service.QuestionRelationService;

/**
 * Description : QuestionRelationController, created on 11/26/2016
 * 
 * @author Patrick-chenziping-TG
 * @version 1.0
 * 
 */
@Controller
@RequestMapping(value = "/questionrelation")
public class QuestionRelationController {

    @Autowired
    QuestionRelationService questionRelationService;

    /**
     * 关联病患题目和家属题目
     */
    @RequestMapping(value = "/connect-question", method = RequestMethod.POST)
    @ResponseBody
    public ResultDto connectQuestion(
            @RequestParam(value = "requestDtoList[]") List<QuesRelationRequestDto> requestDtoList) {
        return questionRelationService.connectQues(requestDtoList);
    }

}
